// function echo<T>(str:T):T{
//     return str
// }
// const str = echo('string');
// const num = echo(123);
// function swap<T,U>(tuple:[T,U]):[U,T]{
//     return [tuple[1],tuple[0]]
// }
// console.log( swap([123,'str']))
// interface IWithLength{
//     length:number
// }
// // 约束传入的泛型参数
// function echoIWithLength<T extends IWithLength>(arg:T):T{
//     return arg;
// }
// console.log(echoIWithLength([1,2,3]))
// console.log(echoIWithLength('123'))
// console.log(echoIWithLength({length:444}))
var Queue = /** @class */ (function () {
    function Queue() {
        this.data = [];
    }
    Queue.prototype.push = function (item) {
        this.data.push(item);
    };
    Queue.prototype.pop = function () {
        return this.data.shift();
    };
    return Queue;
}());
var queue = new Queue();
queue.push(1);
queue.push(222);
console.log(queue.pop().toFixed());
console.log(queue.pop().toFixed());
var kp1 = { key: 1, value: '1111' };
var kp2 = { key: '22222', value: 22 };
var arrTwo = [1, 2, 3];
